
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
	<link rel="stylesheet" href="../css/mui.min.css">
	<link rel="stylesheet" type="text/css" href="../css/iconfont.css"/>
	<link rel="stylesheet" type="text/css" href="../css/youyi.css" />
    <title>搜索</title>  
</head>
<body class="search_body">
	<header class="mui-bar mui-bar-nav top_nav search_head">
		<a class="mui-action-back mui-pull-left mui-icon mui-icon-back detail_left"></a>
		<div class="mui-input-row mui-search mui-title cslt_search">
			<input type="search" class="mui-input-clear" placeholder="请输入关键字" value="优蚁">
		</div>
		<a class="mui-action-back mui-btn mui-btn-link mui-pull-right cancel_btn">取消</a>
	</header>

	<script src="../js/mui.min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript" charset="utf-8">
		//mui初始化 
		mui.init({
			statusBarBackground:'#5ec520',
			swipeBack: false,
			//beforeback: back
		});
		window.addEventListener("parent:view",parentViewFn);
		var pData=null;
		function parentViewFn(event){
				pData=event.detail.parentView.id;				
		};
		function plusReady(){
 			var old_back=mui.back;
 			mui.back=function(){
 				var textInput=document.querySelector('.cslt_search input').value;
 				mui.fire(plus.webview.getWebviewById(pData),"search:close",{searchText:textInput});
 				return false;
 			}; 			
 			//加载搜索页
//			setTimeout(function () {
//				search = mui.preload({
//					id: 'search.html',
//					url: 'search.html',
//					styles: {
//						left:"100%",
//						width:'100%',
//						//background:"rgba(0,0,0,.4)",
//						zindex: 9999
//					}
//				});
//			},6000);
		};
		if (window.plus) {
		    plusReady();
		} else{
		    document.addEventListener('plusready',plusReady,false);
		};
	</script>
</body>
</ html>